package com.wen.Part6;

import com.wen.Part6.DataStructure.AdjacencyMatrix;
import com.wen.Part6.GraphAlgorithm.impl.Prim;

import java.io.File;

public class Main {
    public static void main(String[] args) {
        // 拓扑排序
//        AdjacencyMatrix adjacencyMatrix = new AdjacencyMatrix(new File(Main.class.getResource("topSortGraph.txt").getFile()));
//        adjacencyMatrix.solve(new TopSort2());
        // 迪杰斯特拉
//        AdjacencyMatrix adjacencyMatrix = new AdjacencyMatrix(8);
//        adjacencyMatrix.init(new File(Main.class.getResource("MinPath.txt").getFile()));
//        adjacencyMatrix.solve(new Dijkstra());
        // 关键路径
//        AdjacencyMatrix adjacencyMatrix = new AdjacencyMatrix(new File(Main.class.getResource("keyPath.txt").getFile()));
//        adjacencyMatrix.solve(new KeyPath());

        // 迪杰斯特拉
        AdjacencyMatrix adjacencyMatrix = new AdjacencyMatrix(6);
        adjacencyMatrix.init(new File(Main.class.getResource("Prim.txt").getFile()));
        adjacencyMatrix.setUnOrder();
        adjacencyMatrix.solve(new Prim("v1"));
    }
}